package main

import (
	"fmt"
	"net/http"
)

type Engine struct {
}

func (e Engine) ServeHTTP(w http.ResponseWriter, req *http.Request) {
	switch req.URL.Path {
	case "/":
		fmt.Fprintln(w, req.URL.Path)

	case "/hello":
		fmt.Fprintln(w, "HelloWorld")

	default:
		fmt.Fprintln(w, "404Not Found")
	}
}

func main() {
	app := new(Engine)
	http.ListenAndServe(":9080", app)
}
